<div class="modal" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <button type="button" class="close" ng-click="$hide()">
          <span>&times;</span></button>
        <h4>Submit Application</h4>

        <p style="padding-top: 4px; padding-bottom: 14px;">Upload self contained JAR file and launch it immediately.</p>

        <div ng-show="shouldNoticeSubmitFailed">
          <div class="alert alert-danger alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert"
                    ng-click="shouldNoticeSubmitFailed=false">
              <span aria-hidden="true">&times;</span>
            </button>
            Failed to submit the application.
            <span ng-if="error">
              Check out the
              <span class="help-text"
                 bs-tooltip="error" html="true" placement="bottom"
                 ng-click="showErrorInNewWin()">reason
                <i ng-if="hasStackTrace"
                   class="fa fa-external-link"></i></span>.
            </span>
          </div>
        </div>

        <form>
          <div class="row" style="margin-bottom: 18px">
            <!-- input 1 -->
            <div class="col-sm-4">
              <label class="form-label-vertical" for="jarFileInput">Application JAR</label>
            </div>
            <div class="col-sm-8">
              <div class="form-group has-feedback">
                <input id="jarFileInput" readonly
                       type="text" class="form-control input-sm"
                       ng-value="names['jar']"/>
                <span class="glyphicon glyphicon-folder-open form-control-feedback form-control-feedback-sm clickable"
                      ngf-select ng-model="jar" accept=".jar" ngf-accept="'.jar'"></span>
              </div>
            </div>
            <!-- input 2 -->
            <div class="col-sm-4">
              <label class="form-label-vertical" for="configFileInput">Config File</label>
              <remark tooltip="Optional to provide a config file to override default behaviors"></remark>
            </div>
            <div class="col-sm-8">
              <div class="form-group has-feedback">
                <input id="configFileInput" readonly
                       type="text" class="form-control input-sm"
                       ng-value="names['conf']"/>
                <!-- Toggle buttons -->
                <span ng-hide="names['conf']"
                      class="glyphicon glyphicon-folder-open form-control-feedback form-control-feedback-sm clickable"
                      ngf-select ng-model="conf" accept=".conf" ngf-accept="'.conf'"></span>
                <span ng-show="names['conf']"
                      class="glyphicon glyphicon-trash form-control-feedback form-control-feedback-sm clickable"
                      ng-click="clear('conf')"></span>
              </div>
            </div>
            <!-- input 3 -->
            <div class="col-sm-4">
              <label class="form-label-vertical" for="launchArgsInput">Launch Arguments</label>
              <remark
                tooltip="Optional to provide extra launch arguments. E.g. WordCount can use &quot;-split 2 -sum 1&quot;"></remark>
            </div>
            <div class="col-sm-8">
              <div class="form-group">
                <input id="launchArgsInput" type="text"
                       class="form-control input-sm" ng-model="extraArgs"/>
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary btn-sm"
                ng-disabled="!canSubmit()" ng-click="submit()">
          <span ng-show="uploading"
                class="glyphicon glyphicon-repeat rotate-animation"></span>
          Submit
        </button>
        <button type="button" class="btn btn-default btn-sm" ng-click="$hide()">Cancel</button>
      </div>
    </div>
  </div>
</div>